home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
cmdity
/
blcnts38.lha
/
BlocNotes
/
OpenNote.pvrx
< prev
next >
Wrap
Text File
|
1996-04-12
|
3KB
|
133 lines
/* " Template, History and Information"
** $VER: OpenNote.pvrx 0.002 (08 Feb 1996)
**
** c 1995 Perry Mowbray
** Landscape Imagery
**
** NAME
** OpenNote.pvrx
**
** FUNCTION
** Arexx-Script for ProVector.
**
** Open Note associated WITH drawing (used BlocNotes)
**
**
** SYNOPSIS
**
**
** INPUTS
**
** SUGGESTED "ProVector.pvrx" ENTRIES:
**
** $HISTORY:
**
** 08 Feb 1996 : 000.002 : Creates a new note, IF not found
** 29 Jan 1996 : 000.001 : Initial release
**
**
*/
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 9) ~= "ProVector") then /* not started by ProVector? */
ADDRESS 'ProVector'
'LOCK' /* lock GUI, gain access */
IF RC ~= 0 THEN EXIT
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
/* ------------------------ INSERT YOUR CODE HERE: ------------------- */
ARG v
title = "OpenNote.pvrx 0.002 (08 Feb 1996)"
t = title
IF v = "?" THEN DO
l1 = "Opens Note associated with drawing (used BlocNotes)"
l2 = "c 1996 Perry Mowbray (Landscape Imagery)"
title = t
CALL esyntax
END
IF Pos('blocnotes.rexx' , Show('Ports'))=0 THEN DO
l1 = "BlocNotes is not running"
l2 = ":("
title = t
CALL esyntax
END
GetCurrProj; Proj = RESULT
ProjName Proj; pn = RESULT
sl = LastPos("/",pn)
IF sl = 0 THEN sl = LastPos(":",pn)
IF sl > 0 THEN pn = Right(pn,Length(pn)-sl)
IF Right(pn,5) = ".dr2d" THEN pn = Left(pn,Length(pn)-5)
'UNLOCK'
ADDRESS 'blocnotes.rexx'
SEARCH pn
id=result
IF id=0 THEN DO
OPEN
id = RESULT
PRINT id pn
END
ELSE SHOW id
/* ---------------------------- END OF YOUR CODE --------------------- */
preend:
'UNLOCK' /* VERY important: unlock GUI */
EXIT
SYNTAX:
ADDRESS 'ProVector'
l1="Sorry, error line " || SIGL
l2=ErrorText(RC) || " :-("
title = "Unforseen Error..."
ESYNTAX:
tl=Max(Length(l1),Length(l2))+3
l1=centre(l1,tl)
l2=centre(l2,tl)
tw=(tl*8)+8
GetScreenFormat Screen
If Screen.UseWB="TRUE" then scrname="Workbench"
else scrname="PROVECTOR"
MyReq.PubScreen = scrname
MyReq.0.LeftEdge = 50
MyReq.0.TopEdge = 50
MyReq.0.Width = tw
MyReq.0.Height = 60
MyReq.0.Label = title
MyReq.1.LeftEdge = 8; MyReq.1.TopEdge = 8
MyReq.1.Width = 150; MyReq.1.Height = 16
MyReq.1.Type = Label
MyReq.1.Label = l1
MyReq.2.LeftEdge = 8; MyReq.2.TopEdge = 24
MyReq.2.Width = 150; MyReq.2.Height = 16
MyReq.2.Type = Label
MyReq.2.Label = l2
/* Set up the OK and CANCEL buttons */
MyReq.3.LeftEdge = (tw/2)-32; MyReq.3.TopEdge = 45
MyReq.3.Width = 64; MyReq.3.Height = 12
MyReq.3.Type = Button; MyReq.3.Label = "OK"; MyReq.3.EndGad = 1
/* OK; now pop the requester up */
MyReq.NumGads = 4
address REXXREQUEST 'GetRequest MyReq' ; ROK=Result
CALL preend